odoo.define('web_iframe_ext', function (require) {
    "use strict";
var AbstractAction = require('web.AbstractAction');
var config = require('web.config');
var core = require('web.core');
var framework = require('web.framework');
var session = require('web.session');
var Widget = require('web.Widget');

var QWeb = core.qweb;
var _t = core._t;
var lcontext='';
var Dashboard = AbstractAction.extend({
    template: 'WebReportPurchaseMain',

    init: function(parent, data){
            this.data = data;
            this.parent = parent;
			lcontext=this.data.context.search_default_url;             	
            return this._super.apply(this, arguments);
    },

    start: function(){
            return this.load();
    },


	
    load: function () {
			var self = this;
            var loading_done = new $.Deferred();
	

           session.rpc("/web_settings_dashboard002/data", {}).then(function (data) {
            var iframe = document.getElementById("iframe1");
            iframe.src = lcontext;
          });




            return true;
        },	
	
	


});

    core.action_registry.add('web_iframe_ext.main', Dashboard);

    return {
        Dashboard: Dashboard,
    };

});
